package com.ibeeking.found.workflow.service.common.constants.enums;

public enum ProcessShapeEnum {
    DEFINED_PROCESS(1, "预设流程"),
    FREE_PROCESS(2, "自由流程");

    private Integer type;
    private String name;

    ProcessShapeEnum(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static String getNameByType(Integer type) {
        for (ProcessShapeEnum enumObj : values()) {
            if (enumObj.getType().equals(type)) {
                return enumObj.getName();
            }
        }
        return null;
    }
}
